<style>
  .layout {
    background: #f5f7f9;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
  }

  .demo-spin-icon-load {
    animation: ani-demo-spin 1s linear infinite;
  }

  .demo-spin-col {
    height: 100px;
    position: relative;
  }

  .mb20 {
    margin-bottom: 20px;
  }

  .layout-logo {
    width: 110px;
    height: 30px;
    background: #5b6270;
    border-radius: 3px;
    float: left;
    position: relative;
    top: 15px;
    left: 20px;
  }

  .layout-nav {
    width: 420px;
    margin: 0 auto;
    margin-right: 20px;
  }

  .layout-footer-center {
    text-align: center;
  }

  .content {
    height: auto;
    background-color: white;
    padding-left: 30px;
    padding-right: 30px;
  }

  .items {
    height: 40px;
    line-height: 40px
  }

  .info {
    height: auto;
    background-color: #F8F8FF;
    padding-left: 70px;
    padding-right: 70px;
  }

  .header {
    height: 40px;
    background-color: white;
    line-height: 40px;
    border-bottom: 1px solid #598ED1;
  }

  .info-middle {
    height: 330px;
    background-color: #F8F8FF;
    padding-left: 70px;
    padding-right: 70px;
    padding-bottom: 15px;
  }

  .titles {
    height: 35px;
    background-color: black;
    line-height: 35px;
    font-size: 1rem;
    color: white;
    padding-left: 10px;
  }

  .nopadding .ivu-table-cell {
    padding: 0px 0px;
  }

  .head_btn {
    height: 45px;
    line-height: 45px;
    width: 130px;
    float: left;
    margin-right: 20px;
  }

  .subsidy-img {
    height: 140px;
    width: 120px;
    position: absolute;
    right: 8%;
    top: 11%;
  }
  .ivu-input[disabled], fieldset[disabled] .ivu-input {
    background-color: white;
    opacity: 1;
    cursor: not-allowed;
    color: #515A6E;
  }
  .ivu-select-disabled .ivu-select-selection {
    background-color: white;
    opacity: 1;
    cursor: not-allowed;
    color: #515A6E;
  }
  .ivu-select-input[disabled] {
    cursor: not-allowed;
    color: #ccc;
    -webkit-text-fill-color: #ccc;
  }
</style>
<template>
  <Layout>
    <div class="layout">
      <div class="titles">办件信息</div>
      <div v-if="formItem.operation">
        <div class="head_btn" v-if="formItem.next_step">
          <Button type="primary" style="margin-right:10px" long @click="nextStep(false)">上一步</Button>
        </div>
        <div class="head_btn" v-if="formItem.next_step">
          <Button type="primary" style="margin-right:10px;;background-color:#598ED1;border-color:#598ED1;" long @click="saveOrder">保 存</Button>
        </div>
        <div class="head_btn" v-if="!formItem.next_step">
          <Button type="primary" style="margin-right:10px" :loading="loading" long @click="nextStep(true)">下一步</Button>
        </div>
        <div class="head_btn" v-if="form_url">
          <Button type="error" style="margin-right:10px;background-color:#79A0D1;border-color:#79A0D1;" long @click="downloadPdf">下载PDF</Button>
        </div>
      </div>
    </div>
    <Content class="content">
      <div class="header" v-show="!formItem.operation || !formItem.next_step">
        <span style="font-size: 20px;color: #598ED1 ;">01 事项信息</span>
      </div>
      <div class="info" v-show="!formItem.operation || !formItem.next_step">
        <div class="items">
          <div style="width:100%;float:left">
            <span>事项名称：</span><span>{{itemData.title}}</span>
          </div>
        </div>
        <div class="items">
          <div style="width:100%;float:left">
            <span>事项编码：</span><span>{{itemData.item_id}}</span>
          </div>
        </div>
        <div class="items">
          <div style="width:100%;float:left">
            <span>联系电话: </span><span>{{itemData.LINK_TEL}}</span>
          </div>
        </div>
        <div class="items">
          <div style="width:40%;float:left">
            <span>所属部门：</span><span>{{itemData.jdjg}}</span>
          </div>
          <div style="width:30%;;float:left">
            <span>是否收费：</span><span>{{itemData.CHARGE_FLAG=='0'?'不收费':'收费'}}</span>
          </div>
        </div>
        <div class="items">
          <div style="width:40%;float:left">
            <span>承诺期限：</span><span>{{itemData.PROMISE_DAY}}天</span>
          </div>
          <div style="width:60%;float:left">
            <span>办理时间：</span><span>{{itemData.ACCEPT_TIME}}</span>
          </div>
        </div>
        <div class="items">
          <div style="width:80%;float:left">
            <span>受理条件：</span><span>{{itemData.APPLY_CONDITION}}</span>
          </div>
        </div>
        <div class="items">
          <div style="width:100%;float:left">
            <span>补充说明：</span><span>{{itemData.SXSM}}</span>
          </div>
        </div>
        <div style="clear:both;height:1px;width:100%; overflow:hidden; margin-top:-1px;"></div>
      </div>
      <div class="header" v-show="!formItem.operation || !formItem.next_step">
        <span style="font-size: 20px;color: #598ED1 ;">02 办件信息</span>
      </div>
      <div class="info-middle" v-show="!formItem.operation || !formItem.next_step">
        <div style="width:50%;float:left">
          <Form ref="personinfo" :model="personinfo" :label-width="110" style="margin-top:10px">
            <FormItem label="申请人类型: ">
              <RadioGroup v-model="formItem.radio">
                <Radio label="male">个人</Radio>
              </RadioGroup>
            </FormItem>
            <FormItem label="证件类型: " prop="type">
              <Input v-model="personinfo.type" disabled="disabled"></Input>
            </FormItem>
            <FormItem label="证件编号: " prop="code">
              <Input v-model="personinfo.cardno" disabled="disabled"></Input>
            </FormItem>
            <FormItem label="民族: ">
              <Input v-model="personinfo.folk" disabled="disabled"> </Input>
            </FormItem>
            <FormItem label="地址: ">
              <Input v-model="personinfo.address" disabled="disabled"></Input>
            </FormItem>
          </Form>
        </div>
        <div style="width:50%;float:left">
          <Form ref="personinfo" :model="personinfo" :label-width="100" style="margin-top:10px">
            <FormItem label="申请人: " prop="name">
              <Input v-model="personinfo.name" disabled="disabled"></Input>
            </FormItem>
            <FormItem label="联系电话: ">
              <Input v-model="personinfo.mobile" disabled="disabled"></Input>
            </FormItem>
            <FormItem label="性别: ">
              <Input v-model="personinfo.sex" disabled="disabled"></Input>
            </FormItem>
            <FormItem label="生日: ">
              <Input v-model="personinfo.birthday" disabled="disabled"> </Input>
            </FormItem>
            <FormItem label="政治面貌: ">
              <Input v-model="personinfo.political_outlook" disabled="disabled"></Input>
            </FormItem>
          </Form>
        </div>
      </div>
      <div class="header" v-show="!formItem.operation || formItem.next_step">
        <span style="font-size: 20px;color: #598ED1 ;">03 申报材料</span>
      </div>
      <div style="height: auto; background-color: #F8F8FF;" v-show="!formItem.operation || formItem.next_step">
        <Table v-if="!formItem.reloadTabel" border :columns="columns7" :data="documentlist"></Table>
      </div>
    </Content>
    <Modal v-model="face_mol" title="拍照" @on-visible-change="modalChange" width="700">
      <face-camera :isPlay="face_shows" :extraData="upPicData" :file-path="filePath"
        :file-name="fileName" @img-result="imgResult"></face-camera>
      <div slot="footer">
        <Button type="error" @click="face_mol=false">关闭</Button>
      </div>
    </Modal>
    <Modal v-model="gpy_mol" title="高拍仪" @on-visible-change="modalChange2" @on-cancel="closeHeight" @on-ok="closeHeight">
      <height-camera :isOpen="gpy_shows" :extraData="upPicData" :file-path="filePath"
        :file-name="fileName" @ret-fun="retFun"></height-camera>
    </Modal>
    <Modal
      v-model="mshow"
      title="高拍仪"
      @on-visible-change="modalChange3"  @on-cancel="closeHeight1" @on-ok="closeHeight1">
      <wl-equipment
        :file-path="filePath"
        :file-name="fileName"
        v-model="obj"
        :type="type"
        :is-open="openNow"
        user_idcard="cardId"
        ref="wlEquipment"
        @get_info="imgResult"
        @change="geyImgUrl"
        @change1="change1"
      ></wl-equipment>
    </Modal>
    <Modal v-model="up_pic_mol" title="图片上传" @on-ok="changeToView" :closable="false">
      <Upload multiple action="http://10.40.20.4:8081/api/uc/mzsc/uploadService/uploadPic" :before-upload="beforeUpload">
        <Button icon="ios-cloud-upload-outline">上传图片</Button>
        <span style="margin-left: 250px">请上传小于2M的图片</span>
      </Upload>
      <img :src="temp_photo" style="width: 100%"/>
    </Modal>
    <!-- 图片查看模态框 -->
    <Modal v-model="picPreviewMol.preShow" :closable="false" :styles="{top: '20px'}" width="532">
      <Carousel v-model="picPreviewMol.picIndex" style="width:500px" dots="outside" trigger="hover">
        <CarouselItem class="centerimg" v-for="(imginfo, index) in picPreviewMol.pic_urls" :key="index">
          <img :src="imginfo" class="pre_img_style" />
        </CarouselItem>
      </Carousel>
      <div slot="footer" style="text-align: center">
        <Button type="info" @click="originalGraph">查看原图</Button>
        <Button type="error" v-if="formItem.operation" @click="deletePic">删除当前照片</Button>
        <Button @click="picPreviewMol.preShow=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租赁住房保障变更表单模态框-->
    <Modal v-model="formItem.itemChangeFormShow" :title="formItem.itemChangeFormTitle"
           width="1000" :closable="false" cancel-text="">
      <div v-if="formItem.itemChangeFormShow">
        <Form1 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
               :ruleData="ruleData"  :monthListaa="monthList" @ee="saveStopInfo">
        </Form1>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemChangeFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租赁住房保障申请表单模态框-->
    <Modal v-model="formItem.itemApplyFormShow" :title="formItem.itemApplyFormTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemApplyFormShow">
        <Form2 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
               :tempData="tempData" :aacode="aacode" :itemInfoObj="itemInfoObj"  @ee="saveStopInfo">
        </Form2>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemApplyFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租赁住房保障申请(农业转移人口)表单模态框-->
    <Modal v-model="formItem.itemApplicationAgriculturalShow" :title="formItem.itemApplicationAgriculturalFormTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemApplicationAgriculturalShow">
        <Form2_1 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
                 :tempData="tempData" :aacode="aacode" :itemInfoObj="itemInfoObj" @ee="saveStopInfo">
        </Form2_1>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemApplicationAgriculturalShow=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租赁住房保障资格终止表单模态框-->
    <Modal v-model="formItem.itemStopFormShow" :title="formItem.itemStopFormTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemStopFormShow">
        <Form3 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
               :ruleData="ruleData" @ee="saveStopInfo" :monthListaa="monthList">
        </Form3>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemStopFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租赁住房保障补贴年审表单模态框-->
    <Modal v-model="formItem.itemReviewFormShow" :title="formItem.itemReviewFormTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemReviewFormShow">
        <Form4 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
               :ruleData="ruleData" @ee="saveStopInfo" :monthListaa="monthList" >
        </Form4>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemReviewFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租赁实物配租复核表单模态框-->
    <Modal v-model="formItem.itemCheckFormShow" :title="formItem.itemCheckFormTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemCheckFormShow">
        <Form5 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo">
        </Form5>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemCheckFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租户籍区域转移表单模态框-->
    <Modal v-model="formItem.itemTransferFormShow" :title="formItem.itemTransferFormTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemTransferFormShow">
        <Form6 label-position="right" :label-width="100" style="position: relative;" :ruleData="ruleData" :formDate="formItem.itemInfoForm" @ee="saveStopInfo">
        </Form6>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemTransferFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租赁住房保障录入租赁证表单模态框-->
    <Modal v-model="formItem.itemRegisterFormShow" :title="formItem.itemRegisterFormTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemRegisterFormShow">
        <Form7 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" :ruleData="ruleData" @ee="saveStopInfo">
        </Form7>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemRegisterFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--公共租赁住房摇号登记表单模态框-->
    <Modal v-model="formItem.itemBatchFormShow" :title="formItem.itemBatchFormTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemBatchFormShow">
        <Form8 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" :ruleData="ruleData" @ee="saveStopInfo">
        </Form8>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemBatchFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低保及低保边缘家庭(住房)情况表格封面表单模态框-->
    <Modal v-model="formItem.itemSubsidyApplicationFormShow" :title="formItem.itemSubsidyApplicationFormTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemSubsidyApplicationFormShow">
        <Form9 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
               :tempData="tempData" :aacode="aacode" @ee="saveStopInfo">
        </Form9>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemSubsidyApplicationFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低保及低保边缘家庭基本信息表单模态框-->
    <Modal v-model="formItem.itemBasicFamilyInfoFormShow" :title="formItem.itemBasicFamilyInfoFormTitle"
           width="1200" :closable="false">
      <div v-if="formItem.itemBasicFamilyInfoFormShow">
        <Form9_1 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
                 :tempData="tempData" @ee="saveStopInfo" :isdbnum="isdbnum" :bz_isDb_list="bz_isDb_list" @ff="savecode" @getPersonList="getPersonList">
        </Form9_1>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemBasicFamilyInfoFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低保及低保边缘家庭特殊情况表单模态框-->
    <Modal v-model="formItem.itemExceptionalCaseFormShow" :title="formItem.itemExceptionalCaseFormTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemExceptionalCaseFormShow">
        <Form9_2 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
                 :tempData="tempData" :name_list="name_list" @ee="saveStopInfo" @ff="savecode">
        </Form9_2>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemExceptionalCaseFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低保及低保边缘家庭保障情况表单模态框-->
    <Modal v-model="formItem.itemSecuritySituationFormShow" :title="formItem.itemSecuritySituationFormTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemSecuritySituationFormShow">
        <Form9_3 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo" @ff="savecode">
        </Form9_3>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemSecuritySituationFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低保及低保边缘家庭住房情况表单模态框-->
    <Modal v-model="formItem.itemHousingSituationFormShow" :title="formItem.itemHousingSituationFormTitle"
           width="1200" :closable="false">
      <div v-if="formItem.itemHousingSituationFormShow">
        <Form9_4 label-position="right" :label-width="100" style="position: relative;height: 1200px"
                 :formDate="formItem.itemInfoForm" :ruleData="ruleData" :tempData="tempData" :areamianji="areamianji" :itemInfoObj="itemInfoObj" :total_housing_area="total_housing_area" @ee="saveStopInfo" @ff="savecode">
        </Form9_4>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemHousingSituationFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低收入住房困难家庭（廉租住房）实物配租申请(5个)-->
    <Modal v-model="formItem.itemApplicationLeasingFormShow" :title="formItem.itemApplicationLeasingFormTitle"
           width="1200" :closable="false">
      <Form10 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo">
      </Form10>
      <div slot="footer">
        <Button type="error" @click="formItem.itemApplicationLeasingFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低收入住房困难家庭（廉租住房）租金核减(5个)-->
    <!--低收入住房困难家庭（廉租住房）实物配租年审-->
    <Modal v-model="formItem.itemAnnualReviewFormShow" :title="formItem.itemAnnualReviewFormTitle"
           width="1000" :closable="false">
      <Form14 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo">
      </Form14>
      <div slot="footer">
        <Button type="error" @click="formItem.itemAnnualReviewFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低收入住房困难家庭（廉租住房）住房保障变更-->
    <Modal v-model="formItem.itemHousingSecurityChangeFormShow" :title="formItem.itemHousingSecurityChangeFormTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemHousingSecurityChangeFormShow">
        <Form11 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" :tempData="tempData" :ruleData="ruleData" @ee="saveStopInfo" :monthListaa="monthList">
        </Form11>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemHousingSecurityChangeFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低收入住房困难家庭（廉租住房）住房保障资格终止-->
    <Modal v-model="formItem.itemTerminationOfEligibilityFormShow"
           :title="formItem.itemTerminationOfEligibilityFormTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemTerminationOfEligibilityFormShow">
        <Form12 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo" :monthListaa="monthList" :tempData="tempData" :ruleData="ruleData">
        </Form12>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemTerminationOfEligibilityFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低收入住房困难家庭（廉租住房）住房保障户籍转移-->
    <Modal v-model="formItem.itemRegionalTransferFormShow" :title="formItem.itemRegionalTransferFormTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemRegionalTransferFormShow">
        <Form13 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo" :ruleData="ruleData">
        </Form13>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemRegionalTransferFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!--低收入住房困难家庭（廉租住房）租赁补贴年审-->
    <Modal v-model="formItem.itemAnnualReviewOfRentalSubsidyFormShow" :title="formItem.itemAnnualReviewOfRentalSubsidyFormTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemAnnualReviewOfRentalSubsidyFormShow">
        <Form15 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo">
        </Form15>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemAnnualReviewOfRentalSubsidyFormShow=false">关闭</Button>
      </div>
    </Modal>
    <!-- ******************************************************************************************************************************************************-->
    <!--低收入住房困难家庭（廉租住房）租金核减表单模态框-->
    <Modal v-model="formItem.itemaa" :title="formItem.itemaaTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemaa">
        <Form16 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
                :tempData="tempData" :aacode="aacode" @ee="saveStopInfo" @ff="savecode">
        </Form16>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemaa=false">关闭</Button>
      </div>
    </Modal>
    <!--低保边缘家庭基本信息表单模态框16-1-->
    <Modal v-model="formItem.itembb" :title="formItem.itembbTitle"
           width="1200" :closable="false">
      <div v-if="formItem.itembb">
        <Form16_1 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
                  :tempData="tempData" :bz_isDb_list="bz_isDb_list" @ee="saveStopInfo" :isdbnum="isdbnum">
        </Form16_1>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itembb=false">关闭</Button>
      </div>
    </Modal>
    <!--低保边缘家庭特殊情况表单模态框16-2-->
    <Modal v-model="formItem.itemcc" :title="formItem.itemccTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemcc">
        <Form16_2 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm"
                  :tempData="tempData" @ee="saveStopInfo">
        </Form16_2>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemcc=false">关闭</Button>
      </div>
    </Modal>
    <!--低保边缘家庭保障情况表单模态框16-3-->
    <Modal v-model="formItem.itemdd" :title="formItem.itemccTitle"
           width="1000" :closable="false">
      <div v-if="formItem.itemdd">
        <Form16_3 label-position="right" :label-width="100" style="position: relative;" :formDate="formItem.itemInfoForm" @ee="saveStopInfo">
        </Form16_3>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemdd=false">关闭</Button>
      </div>
    </Modal>
    <!--低保边缘家庭住房情况表单模态框16-4-->
    <Modal v-model="formItem.itemee" :title="formItem.itemeeTitle"
           width="1300" :closable="false">
      <div v-if="formItem.itemee">
        <Form16_4 label-position="right" :label-width="100" style="position: relative;height: 1200px"
                  :formDate="formItem.itemInfoForm" :tempData="tempData" :areamianji="areamianji" :isdbnum="isdbnum" :itemInfoObj="itemInfoObj" :ruleObj="ruleObj" :total_housing_area="total_housing_area" @ee="saveStopInfo">
        </Form16_4>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemee=false">关闭</Button>
      </div>
    </Modal>
    <!--低收入住房困难家庭实物配租申请模态框17   基础信息表-->
    <Modal v-model="formItem.itemaaa" :title="formItem.itemBasicInformation"
           width="1200" :closable="false">
      <div v-if="formItem.itemaaa">
        <Form17 label-position="right" :label-width="100" style="position: relative"
                :formDate="formItem.itemInfoForm" :bz_isDb_list="bz_isDb_list" :tempData="tempData" :aacode="aacode" @ee="saveStopInfo">
        </Form17>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemaaa=false">关闭</Button>
      </div>
    </Modal>
    <!--低收入住房困难家庭实物配租申请模态框17-1  低保家庭基本情况-->
    <Modal v-model="formItem.itembbb" :title="formItem.itemSubsistencAllowances"
           width="1200" :closable="false">
      <div v-if="formItem.itembbb">
        <Form17_1 label-position="right" :label-width="100" style="position: relative"
                  :formDate="formItem.itemInfoForm" :bz_isDb_list="bz_isDb_list" :tempData="tempData" :isdbnum="isdbnum" @ee="saveStopInfo">
        </Form17_1>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itembbb=false">关闭</Button>
      </div>
    </Modal>
    <!--低收入住房困难家庭实物配租申请模态框17-2 特殊情况-->
    <Modal v-model="formItem.itemccc" :title="formItem.itemExceptionalCase"
           width="1200" :closable="false">
      <div v-if="formItem.itemccc">
        <Form17_2 label-position="right" :label-width="100" style="position: relative"
                  :formDate="formItem.itemInfoForm" :tempData="tempData" @ee="saveStopInfo">
        </Form17_2>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemccc=false">关闭</Button>
      </div>
    </Modal>
    <!--低收入住房困难家庭实物配租申请模态框17-3 家庭住房保障情况-->
    <Modal v-model="formItem.itemddd" :title="formItem.itemHousingSecurity"
           width="1200" :closable="false">
      <div v-if="formItem.itemddd">
        <Form17_3 label-position="right" :label-width="100" style="position: relative"
                  :formDate="formItem.itemInfoForm" :tempData="tempData" @ee="saveStopInfo">
        </Form17_3>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemddd=false">关闭</Button>
      </div>
    </Modal>
    <!--低收入住房困难家庭实物配租申请模态框17-4 家庭住房情况-->
    <Modal v-model="formItem.itemeee" :title="formItem.itemFamilyHousing"
           width="1200" :closable="false">
      <div v-if="formItem.itemeee">
        <Form17_4 label-position="right" :label-width="100" style="position: relative"
                  :formDate="formItem.itemInfoForm" :tempData="tempData" :areamianji="areamianji" :isdbnum="isdbnum" :itemInfoObj="itemInfoObj" :total_housing_area="total_housing_area"  @ee="saveStopInfo">
        </Form17_4>
      </div>
      <div slot="footer">
        <Button type="error" @click="formItem.itemeee=false">关闭</Button>
      </div>
    </Modal>
    <!--PDF打印-->
    <Modal v-model="pdfModal" title="PDF下载" width="1000" :closable="false" >
      <Row>
          <Col span="24" id="printMe1" class="ivu-form-item-content" style="text-align: center">
            <embed width="800" height="600" :src="form_url"></embed>
          </Col>
      </Row>
      <div slot="footer">
        <!-- <Button type="success" v-print="'#printMe1'">打印</Button> -->
        <Button type="error" @click="pdfModal=false">关闭</Button>
      </div>
    </Modal>

  </Layout>
</template>
<script>
import FaceCamera from '_c/face2-camera'
import HeightCamera from '_c/height2-camera'
import WlForm from '_c/wl-form'
// import formdata from '@/mock/data/form-data.js'
import { userinfo, iteminf, createOrder, updateOrder, date2str, communityInfo, getSQCode } from '@/api/eventlist'
import { ensureApply } from '@/api/houseproperty'
import { getSign, createUpLoadFiles } from '@/api/common'
import nophoto from '@/assets/images/nophoto.jpeg'
import SplitPane from '@/components/split-pane/split'
import Form1 from './components/form-other1/index'
import Form2 from './components/form-other2/index'
import Form2_1 from './components/form-other2-1/index'
import Form3 from './components/form-other3/index'
import Form4 from './components/form-other4/index'
import Form5 from './components/form-other5/index'
import Form6 from './components/form-other6/index'
import Form7 from './components/form-other7/index'
import Form8 from './components/form-other8/index'
import Form9 from './components/form-other9/index'
import Form9_1 from './components/form-other9-1/index'
import Form9_2 from './components/form-other9-2/index'
import Form9_3 from './components/form-other9-3/index'
import Form9_4 from './components/form-other9-4/index'
import Form10 from './components/form-other10/index'
import Form11 from './components/form-other11/index'
import Form12 from './components/form-other12/index'
import Form13 from './components/form-other13/index'
import Form14 from './components/form-other14/index'
import Form15 from './components/form-other15/index'
import Form16 from './components/form-other16/index'
import Form16_1 from './components/form-other16-1/index'
import Form16_2 from './components/form-other16-2/index'
import Form16_3 from './components/form-other16-3/index'
import Form16_4 from './components/form-other16-4/index'
import Form17 from './components/form-other17/index'
import Form17_1 from './components/form-other17-1/index'
import Form17_2 from './components/form-other17-2/index'
import Form17_3 from './components/form-other17-3/index'
import Form17_4 from './components/form-other17-4/index'
import Modal1 from './components/modal-other1/index'
import WlEquipment from '@/components/wl-equipment/index'
export default {
  data () {
    return {
      errorTitle: '错误',
      obj: {},
      mshow: false,
      pdfModal: false,
      form_url: '', // 打印pdf地址
      loading: false,
      severUserInfo: {},
      type: 'heightCamera',
      filePath: '', // 上传图片地址
      fileName: '', // 上传图片名称
      openNow: false,
      readStatus: false,
      faceStatus: false,
      array: [
        {
          id: 1,
          name: '1'
        }, {
          id: 2,
          name: '1-1',
          parentId: 1
        }, {
          id: 3,
          name: '1-1-1',
          parentId: 2
        }, {
          id: 4,
          name: '1-2',
          parentId: 1
        }, {
          id: 5,
          name: '1-2-2',
          parentId: 4
        }, {
          id: 6,
          name: '1-1-1-1',
          parentId: 3
        }, {
          id: 7,
          name: '2'
        }
      ],
      bz_isDb_list: [],
      name_list: {}, // 9_1往9_2传入人员情况
      ruleObj: {},
      itemInfoObj: {},
      total_housing_area: 0, // 住房总建筑面积9
      areamianji: '',
      isdbnum: 0,
      sectionListb: {},
      aacode: '',
      communityData: {},
      // formdata111: {},
      monthList: [],
      tempData: {},
      ruleData: {},
      personTypeList: [],
      interface_code: this.$route.params.interface_code,
      // 事项详细信息(01 事项信息)
      itemData: {},
      // 办理人员信息(02 办件信息)
      personinfo: {},
      // 申报材料列表(03 申报材料)
      documentlist: [],
      // 图片要件预览临时变量
      temp_photo: '',
      // 拍照弹出框控制器
      face_mol: false,
      // 控制打开or关闭拍照功能
      face_shows: false,
      // 高拍仪弹出框控制器
      gpy_mol: false,
      // 控制打开or关闭高拍仪功能
      gpy_shows: false,
      up_pic_mol: false,
      // 图片要件预览弹出框控制器
      pic_preview_mol: false,
      face_loading: false,
      // 图片要件预览弹出框控制器
      picPreviewMol: {
        preShow: false,
        pic_urls: [],
        picIndex: 0
      },
      upPicData: {},
      nophoto,
      // 页面内其他的功能变量
      formItem: {
        // 跳入当前页面时，需要的操作，1添加或编辑 2查看 3审核
        operation: '',
        next_step: false,
        // 上个页面带过来的按钮，目前只有审核有按钮
        buttons_list: {},
        // 上个页面带的按钮，功能能模态框
        fun_modal: { show: false },
        a: '低保残疾人',
        b: '生活补贴',
        reloadTabel: false,
        // 在点击申报材料后面按钮时，记录当前要件在列表的索引位置
        paramIndex: 0,
        radio: 'male',
        itemInfoFormShow: false,
        itemSubsidyFormShow: false,
        itemDeathFormShow: false,
        itemChangeFormShow: false, // 公租房变更
        itemApplyFormShow: false, // 公租房申请
        itemApplicationAgriculturalShow: false, // 公租房申请-农业转移人口
        itemStopFormShow: false, // 公租房保障资格终止
        itemReviewFormShow: false, // 公租房保障补贴年审
        itemCheckFormShow: false, // 公租房实物配租复核
        itemTransferFormShow: false, // 公租房户籍区域转移
        itemRegisterFormShow: false, // 公共租赁住房保障录入租赁证
        itemBatchFormShow: false, // 公租房摇号申请登记
        itemSubsidyApplicationFormShow: false, // 廉租住房）租赁补贴申请
        itemBasicFamilyInfoFormShow: false, // 低保及低保边缘家庭基本信息
        itemExceptionalCaseFormShow: false, // 低保及低保边缘家庭特殊情况
        itemSecuritySituationFormShow: false, // 低保及低保边缘家庭保障情况
        itemHousingSituationFormShow: false, // 低保及低保边缘家庭住房情况
        itemApplicationLeasingFormShow: false, // 低收入住房困难家庭（廉租住房）实物配租申请
        itemHousingSecurityChangeFormShow: false, // 低收入住房困难家庭（廉租住房）住房保障变更
        itemTerminationOfEligibilityFormShow: false, // 低收入住房困难家庭（廉租住房）住房保障资格终止
        itemRegionalTransferFormShow: false, // 低收入住房困难家庭（廉租住房）住房户籍区域转移
        itemAnnualReviewFormShow: false, // 低收入住房困难家庭（廉租住房）实物配租年审
        itemAnnualReviewOfRentalSubsidyFormShow: false, // 低收入住房困难家庭（廉租住房）租赁补贴年审
        itemaa: false, // 低收入住房困难家庭（廉租住房）租金核减表单模态框
        itembb: false, // 低保边缘家庭基本信息表单模态框16-1
        itemcc: false, // 低保边缘家庭特殊情况表单模态框16-2
        itemdd: false, // 低保边缘家庭保障情况表单模态框16-3
        itemee: false, // 低保边缘家庭住房情况表单模态框16-4
        itemaaa: false,
        itembbb: false,
        itemccc: false,
        itemddd: false,
        itemeee: false,
        itemBasicInformation: '',
        itemExceptionalCase: '',
        itemSubsistencAllowances: '',
        itemHousingSecurity: '',
        itemFamilyHousing: '',
        itemInfoFormTitle: '',
        itemSubsidyFormTitle: '',
        itemDeathFormTitle: '',
        itemChangeFormTitle: '',
        itemApplyFormTitle: '',
        itemApplicationAgriculturalFormTitle: '',
        itemStopFormTitle: '',
        itemReviewFormTitle: '',
        itemCheckFormTitle: '',
        itemTransferFormTitle: '',
        itemRegisterFormTitle: '',
        itemBatchFormTitle: '',
        itemSubsidyApplicationFormTitle: '',
        itemBasicFamilyInfoFormTitle: '',
        itemExceptionalCaseFormTitle: '',
        itemSecuritySituationFormTitle: '',
        itemHousingSituationFormTitle: '',
        itemApplicationLeasingFormTitle: '',
        itemHousingSecurityChangeFormTitle: '',
        itemTerminationOfEligibilityFormTitle: '',
        itemRegionalTransferFormTitle: '',
        itemAnnualReviewFormTitle: '',
        itemAnnualReviewOfRentalSubsidyFormTitle: '',
        itemaaTitle: '',
        itembbTitle: '',
        itemccTitle: '',
        itemddTitle: '',
        itemeeTitle: '',
        itemInfoForm: {
          itemid: this.$route.params.itemid
        },
        dict: {
          't_file': '文件要件',
          't_form': '信息表单',
          'wt_images': '图片',
          'wt_form': '表单'
        }
      },
      personList: [
        {
          bz_relation: 0,
          bz_name: '0',
          bz_idcard: '',
          bz_companyName: '',
          bz_kzpnsr: '0',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_idcard: '',
          bz_companyName: '',
          bz_kzpnsr: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_idcard: '',
          bz_companyName: '',
          bz_kzpnsr: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_idcard: '',
          bz_companyName: '',
          bz_kzpnsr: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_idcard: '',
          bz_companyName: '',
          bz_kzpnsr: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_idcard: '',
          bz_companyName: '',
          bz_kzpnsr: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_idcard: '',
          bz_companyName: '',
          bz_kzpnsr: '',
          bz_isDb: ''
        }
      ], // 公租房申请
      houseList: [
        {
          holder: '',
          address: '',
          buildArea: '',
          ownerType: ''
        },
        {
          holder: '',
          address: '',
          buildArea: '',
          ownerType: ''
        },
        {
          holder: '',
          address: '',
          buildArea: '',
          ownerType: ''
        },
        {
          holder: '',
          address: '',
          buildArea: '',
          ownerType: ''
        }
      ], // 公租房申请
      personList1: [
        {
          bz_relation: '0',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        }
      ], // 廉租房租赁补贴申请
      houseList1: [
        {
          Address: '',
          ownerType: '',
          owerchanq: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPerson: 0,
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: 0
        },
        {
          Address: '',
          ownerType: '',
          owerchanq: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPerson: 0,
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: 0
        },
        {
          Address: '',
          ownerType: '',
          owerchanq: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPerson: 0,
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: 0
        },
        {
          Address: '',
          ownerType: '',
          owerchanq: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPerson: 0,
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: 0
        },
        {
          Address: '',
          ownerType: '',
          owerchanq: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPerson: 0,
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: 0
        }
      ], // 廉租房租赁补贴申请
      personPaperList1: [
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        },
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        },
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        },
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        },
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        }
      ], // 廉租房租赁补贴申请
      personList2: [
        {
          bz_relation: '0',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        }
      ], // 廉租房租赁实物配租申请
      houseList2: [
        {
          Address: '',
          ownerType: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPerson: 0,
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: 0
        },
        {
          Address: '',
          ownerType: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPerson: 0,
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: 0
        },
        {
          Address: '',
          ownerType: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPerson: 0,
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: 0
        },
        {
          Address: '',
          ownerType: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPerson: 0,
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: 0
        },
        {
          Address: '',
          ownerType: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPerson: 0,
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: 0
        }
      ], // 廉租房租赁实物配租申请
      personPaperList2: [
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        },
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        },
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        },
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        },
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        }
      ], // 廉租房租赁实物配租申请
      personList3: [
        {
          bz_relation: '0',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        },
        {
          bz_relation: '',
          bz_name: '',
          bz_sex: '',
          bz_marrageFlag: '',
          bz_companyName: '',
          bz_address: '',
          bz_idcard: '',
          bz_birthday: '',
          bz_isDb: ''
        }
      ], // 廉租房租赁租金核减
      houseList3: [
        {
          Address: '',
          ownerType: '',
          owerchanq: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPerson: 0,
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: 0
        },
        {
          Address: '',
          ownerType: '',
          owerchanq: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPerson: 0,
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: 0
        },
        {
          Address: '',
          ownerType: '',
          owerchanq: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPerson: 0,
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: 0
        },
        {
          Address: '',
          ownerType: '',
          owerchanq: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPerson: 0,
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: 0
        },
        {
          Address: '',
          ownerType: '',
          owerchanq: '',
          owner: '',
          buildArea: '',
          useArea: '',
          gjPerson: '',
          bzPerson: 0,
          bzPercent: '',
          holder: '',
          buildAveAreaHfh: 0
        }
      ], // 廉租房租赁租金核减
      personPaperList3: [
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        },
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        },
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        },
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        },
        {
          name: '',
          paperName: '',
          paperNumber: '',
          issueDate: ''
        }
      ], // 廉租房租赁租金核减
      // 申报材料表头
      columns7: [
        { title: '序号', type: 'index', width: 70, align: 'center' },
        { title: '材料名称', key: 'name', width: 170 },
        { title: '是否必填', key: 'necessary_name', align: 'center', width: 90 },
        { title: '要件件类型', key: 'type_name', width: 90 },
        { title: '是否提交', key: 'is_submit', width: 90 },
        { title: '备注', key: 'remark', width: 260 },
        {
          title: '操作',
          key: 'action',
          align: 'center',
          className: 'nopadding',
          render: (h, params) => {
            let temp = []
            if (params.row.write_type === 'images') {
              if (this.formItem.operation) {
                temp.push(
                  h('Button', {
                    props: { type: 'primary', size: 'small' },
                    style: { marginRight: '5px' },
                    on: {
                      click: () => {
                        if (this.severUserInfo.email === 'JieYuDevice') {
                          this.gpy_mol = true
                          this.gpy_shows = true
                        } else {
                          this.type = 'heightCamera'
                          this.mshow = true
                          this.openNow = true
                        }
                        this.upPicData.fileName = params.row.name + this.datetime2str(new Date()) + '.png'
                        this.fileName = this.upPicData.fileName
                        this.upPicData.filePath = 'itemorder/' + this.personinfo.id + '/' + this.$route.params.code
                        this.filePath = this.upPicData.filePath
                        this.formItem.paramIndex = params.index
                      }
                    }
                  }, '高拍仪')
                )
                temp.push(
                  h('Button', {
                    props: { type: 'primary', size: 'small' },
                    style: { marginRight: '5px' },
                    on: {
                      click: () => {
                        if (this.severUserInfo.email === 'JieYuDevice') {
                          this.face_mol = true
                          this.face_shows = true
                        } else {
                          this.getIdCardInfo(2)
                        }
                        this.upPicData.fileName = params.row.name + this.datetime2str(new Date()) + '.png'
                        this.fileName = this.upPicData.fileName
                        this.upPicData.filePath = 'itemorder/' + this.personinfo.id + '/' + this.$route.params.code
                        this.filePath = this.upPicData.filePath
                        this.formItem.paramIndex = params.index
                      }
                    }
                  }, '拍照')
                )
                temp.push(
                  h('Button', {
                    props: { type: 'primary', size: 'small' },
                    style: { marginRight: '5px' },
                    on: {
                      click: () => {
                        this.up_pic_mol = true
                        this.upPicData.fileName = params.row.name + this.datetime2str(new Date())
                        this.upPicData.filePath = 'itemorder/' + this.personinfo.id + '/' + this.$route.params.code
                        this.formItem.paramIndex = params.index
                        this.temp_photo = ''
                      }
                    }
                  }, '上传')
                )
              }
              if (params.row.is_submit === '已提交') {
                temp.push(
                  h('Button', {
                    props: { type: 'info', size: 'small' },
                    style: { marginRight: '5px' },
                    on: {
                      click: () => {
                        this.picPreviewMol.pic_urls = params.row.img_urls
                        this.picPreviewMol.preShow = true
                        this.picPreviewMol.picIndex = 0
                        this.formItem.paramIndex = params.index
                      }
                    }
                  }, this.formItem.operation ? '预览' : '查看')
                )
              }
            } else if (params.row.write_type === 'form') {
              temp.push(
                h('Button', {
                  props: { type: 'info', size: 'small' },
                  style: { marginRight: '5px' },
                  on: {
                    click: () => {
                      this.formItem.paramIndex = params.index
                      this.popApplicationAgriculturalForm(params.row)
                    }
                  }
                }, this.formItem.operation ? '编辑' : '查看')
              )
            }
            return h('div', temp)
          }
        }
      ]
    }
  },
  components: {
    SplitPane,
    FaceCamera,
    HeightCamera,
    WlForm,
    Form1,
    Form2,
    Form2_1,
    Form3,
    Form4,
    Form5,
    Form6,
    Form7,
    Form8,
    Form9,
    Form9_1,
    Form9_2,
    Form9_3,
    Form9_4,
    Form10,
    Form11,
    Form12,
    Form13,
    Form14,
    Form15,
    Form16,
    Form16_1,
    Form16_2,
    Form16_3,
    Form16_4,
    Form17,
    Form17_1,
    Form17_2,
    Form17_3,
    Form17_4,
    Modal1,
    WlEquipment
  },
  methods: {
    getIdCardInfo (type) {
      console.log('!!!@!@')
      if (type === 1) {
        console.log('!!@!@!@!')
        this.type = 'idcard'
        this.$refs.wlEquipment.getResult()
      }
      if (type === 2) {
        this.type = 'faceCamera'
        this.mshow = true
        this.openNow = true
      }
    },
    commInfo () {
      let a = {}
      communityInfo(a).then(res => {
        if (res.data.errcode === 0) {
          console.log(res.data.data, '9999999')
          console.log(res.data.data.jiedao_code, '888888888')
          this.communityData = res.data.data
          this.formItem.itemInfoForm.inputCommittee = this.communityData.shequ_code
        } else {
          this.$Notice.error({ title: '获取失败', desc: res.data.data.msg })
        }
      })
    },
    modalChange (e) {
      this.face_shows = e
    },
    modalChange2 (e) {
      this.openNow = e
    },
    modalChange3 (e) {
      this.openNow = e
    },
    // 新高拍仪拍照回调函数
    change1 (data) {
      if (data.url) {
        // this.mshow = false
        // this.openNow = false
        let list = this.documentlist[this.formItem.paramIndex]
        if (list.img_urls) {
          list.img_urls.push(data.url)
        } else {
          list.img_urls = [data.url]
        }
        this.changeToView()
      } else {
        this.$Notice.error({ title: '拍照失败,请重新拍摄' })
      }
    },
    // 页面内提交材料发生变化时刷新表格数据动态
    changeToView () {
      console.log('afasdfsdaf')
      this.formItem.reloadTabel = true
      let temp = this.documentlist[this.formItem.paramIndex]
      console.log(temp)
      if (temp.img_urls || temp.write_type === 'form') {
        temp.is_submit = '已提交'
      }
      this.$nextTick(() => {
        this.formItem.reloadTabel = false
      })
    },
    saveStopInfo (aa, bb) {
      console.log(aa, bb, '从第一页带到后面表单页面的数据')
      this.formItem.itemInfoFormShow = false
      this.formItem.itemSubsidyFormShow = false
      this.formItem.itemDeathFormShow = false
      this.formItem.itemChangeFormShow = false // 公租房变更
      this.formItem.itemApplyFormShow = false // 公租房申请
      this.formItem.itemApplicationAgriculturalShow = false // 公租房申请-农业转移人口
      this.formItem.itemStopFormShow = false // 公租房保障资格终止
      this.formItem.itemReviewFormShow = false // 公租房保障补贴年审
      this.formItem.itemCheckFormShow = false // 公租房实物配租复核
      this.formItem.itemTransferFormShow = false // 公租房户籍区域转移
      this.formItem.itemRegisterFormShow = false // 公共租赁住房保障录入租赁证
      this.formItem.itemBatchFormShow = false // 公租房摇号申请登记
      this.formItem.itemSubsidyApplicationFormShow = false// 廉租住房）租赁补贴申请
      this.formItem.itemBasicFamilyInfoFormShow = false // 低保及低保边缘家庭基本信息
      this.formItem.itemExceptionalCaseFormShow = false// 低保及低保边缘家庭特殊情况
      this.formItem.itemSecuritySituationFormShow = false // 低保及低保边缘家庭保障情况
      this.formItem.itemHousingSituationFormShow = false // 低保及低保边缘家庭住房情况
      this.formItem.itemApplicationLeasingFormShow = false // 低收入住房困难家庭（廉租住房）实物配租申请
      this.formItem.itemHousingSecurityChangeFormShow = false // 低收入住房困难家庭（廉租住房）住房保障变更
      this.formItem.itemTerminationOfEligibilityFormShow = false // 低收入住房困难家庭（廉租住房）住房保障资格终止
      this.formItem.itemRegionalTransferFormShow = false // 低收入住房困难家庭（廉租住房）住房户籍区域转移
      this.formItem.itemAnnualReviewFormShow = false // 低收入住房困难家庭（廉租住房）实物配租年审
      this.formItem.itemAnnualReviewOfRentalSubsidyFormShow = false // 低收入住房困难家庭（廉租住房）租赁补贴年审
      this.formItem.itemaa = false // 低收入住房困难家庭（廉租住房）租金核减表单模态框
      this.formItem.itembb = false // 低保边缘家庭基本信息表单模态框16-1
      this.formItem.itemcc = false // 低保边缘家庭特殊情况表单模态框16-2
      this.formItem.itemdd = false // 低保边缘家庭保障情况表单模态框16-3
      this.formItem.itemee = false // 低保边缘家庭住房情况表单模态框16-4
      this.formItem.itemaaa = false // 低收入住房困难家庭（廉租住房 实物配租申请表单模态框
      this.formItem.itembbb = false // 低保边缘家庭基本信息表单模态框16-1
      this.formItem.itemccc = false // 低保边缘家庭特殊情况表单模态框16-2
      this.formItem.itemddd = false // 低保边缘家庭保障情况表单模态框16-3
      this.formItem.itemeee = false // 低保边缘家庭住房情况表单模态框16-4
      this.isdbnum = aa
      this.areamianji = bb
      this.changeToView()
    },
    savecode (obj) {
      console.log(obj, '验证数据')
      this.ruleObj = obj
      console.log(this.ruleObj, '从16-1传到16-4的规则信息')
    },
    getPersonList (list) { // 获取家庭人员数据
      console.log(list, '家庭成员数据')
      this.name_list = list
    },
    // 拍照回调函数
    imgResult (data) {
      if (data.url) {
        this.face_mol = false
        this.face_shows = false
        let list = this.documentlist[this.formItem.paramIndex]
        if (list.img_urls) {
          list.img_urls.push(data.url)
        } else {
          list.img_urls = [data.url]
        }
        this.changeToView()
      } else {
        this.$Notice.error({ title: '拍照失败,请重新拍摄' })
      }
    },
    // 高拍仪保存函数
    retFun (data) {
      if (data.url) {
        this.gpy_mol = false
        this.gpy_shows = false
        let list = this.documentlist[this.formItem.paramIndex]
        if (list.img_urls) {
          list.img_urls.push(data.url)
        } else {
          list.img_urls = [data.url]
        }
        this.changeToView()
      } else {
        this.$Notice.error({ title: '拍照失败,请重新拍摄' })
      }
    },
    // 新设备高拍仪保存函数
    geyImgUrl (data) {
      console.log(data, '!@!@!!@!@!@!@####')
      if (data.url) {
        this.gpy_mol = false
        this.gpy_shows = false
        let list = this.documentlist[this.formItem.paramIndex]
        if (list.img_urls) {
          list.img_urls.push(data.url)
        } else {
          list.img_urls = [data.url]
        }
        this.changeToView()
      } else {
        this.$Notice.error({ title: '拍照失败,请重新拍摄' })
      }
    },
    // 上传图片回调函数
    uploadPicSuccess (res, file) {
      if (res.state === 'SUCCESS') {
        this.documentlist[this.formItem.paramIndex].img_url = res.url
        this.temp_photo = res.url
      } else {
        this.$Notice.error({ title: '', desc: res.msg })
      }
    },
    // 时间转字符串 年月日时分秒
    datetime2str (date) {
      let time1 = date.getFullYear() + ''
      let month = date.getMonth() + 1
      let day = date.getDate()
      let hh = date.getHours()
      let mm = date.getMinutes()
      let ss = date.getSeconds()
      time1 += month < 10 ? '0' + month : month
      time1 += day < 10 ? '0' + day : day
      time1 += hh < 10 ? '0' + hh : hh
      time1 += mm < 10 ? '0' + mm : mm
      time1 += ss < 10 ? '0' + ss : ss
      return time1
    },
    // 公共模态框弹出的方法
    popApplicationAgriculturalForm (item) {
      this.commInfo()
      this.getValidateRules()
      this.getDbList()
      this.formItem.itemApplicationAgriculturalFormTitle = item.name
      if (this.$route.params.code) {
        console.log('编辑')
        this.formItem.itemInfoForm.applyPerson = this.personinfo.name // 姓名
        this.formItem.itemInfoForm.applyIdCard = this.$route.params.cardno // 身份证号
        this.formItem.itemInfoForm.inputCommittee = this.communityData.shequ_code
        this.formItem.itemInfoForm.familyCode = this.ruleData.familyCode
        if (this.itemData.form_params) { // 如果返回值里面有表单数据
          var d = Object.assign({}, this.formItem.itemInfoForm, JSON.parse(this.itemData.form_params))
          this.formItem.itemInfoForm = d
          console.log(this.formItem.itemInfoForm, '表单数据')
          this.total_housing_area = this.formItem.itemInfoForm.buildArea
          this.itemInfoObj = this.formItem.itemInfoForm
          this.getDbList()
          if (this.formItem.itemInfoForm.houseList) {
            var num = this.formItem.itemInfoForm.houseList.length
            for (var i = 0; i < num; i++) {
              this.houseList1[i] = this.formItem.itemInfoForm.houseList[i] // 廉租房补贴申请房
              this.houseList[i] = this.formItem.itemInfoForm.houseList[i] // 公租房申请
              this.houseList2[i] = this.formItem.itemInfoForm.houseList[i] // 廉租房实物配租申请
              this.houseList3[i] = this.formItem.itemInfoForm.houseList[i] // 廉租房实物租金核减
            }
          }
          if (this.formItem.itemInfoForm.personList) {
            var num1 = this.formItem.itemInfoForm.personList.length
            for (var j = 0; j < num1; j++) {
              this.personList1[j] = this.formItem.itemInfoForm.personList[j] // 廉租房补贴申请人
              this.personList[j] = this.formItem.itemInfoForm.personList[j] // 公租房申请
              this.personList2[j] = this.formItem.itemInfoForm.personList[j] // 廉租房实物配租申请
              this.personList3[j] = this.formItem.itemInfoForm.personList[j] // 廉租房实物租金核减
            }
          }
          if (this.formItem.itemInfoForm.personPaperList) {
            var num2 = this.formItem.itemInfoForm.personPaperList.length
            for (var k = 0; k < num2; k++) {
              this.personPaperList1[k] = this.formItem.itemInfoForm.personPaperList[k] // 廉租房补贴申请低保人口
              this.personPaperList2[k] = this.formItem.itemInfoForm.personPaperList[k] // 廉租房实物配租申请
              this.personPaperList3[k] = this.formItem.itemInfoForm.personPaperList[k] // 廉租房实物租金核减
            }
          }
        }
        this.tempData.personList = this.personList // 公租房申请
        this.tempData.houseList = this.houseList // 公租房申请
        this.tempData.personList[0].bz_name = this.personinfo.name // 公租房申请
        this.tempData.personList[0].bz_idcard = this.$route.params.cardno // 公租房申请
        this.tempData.personList1 = this.personList1 // 廉租房补贴申请
        this.tempData.houseList1 = this.houseList1 // 廉租房补贴申请
        this.tempData.personList1[0].bz_name = this.personinfo.name // 廉租房补贴申请
        this.tempData.personList1[0].bz_idcard = this.$route.params.cardno // 廉租房补贴申请
        this.tempData.personPaperList1 = this.personPaperList1 // 廉租房补贴申请
        this.tempData.personList2 = this.personList2 // 廉租房实物配租申请
        this.tempData.houseList2 = this.houseList2 // 廉租房实物配租申请
        this.tempData.personList2[0].bz_name = this.personinfo.name // 廉租房补贴申请
        this.tempData.personList2[0].bz_idcard = this.$route.params.cardno // 廉租房补贴申请
        this.tempData.personPaperList2 = this.personPaperList2 // 廉租房实物配租申请
        this.tempData.personList3 = this.personList3 // 廉租房租金核减
        this.tempData.houseList3 = this.houseList3 // 廉租房租金核减
        this.tempData.personList3[0].bz_name = this.personinfo.name // 廉租房补贴申请
        this.tempData.personList3[0].bz_idcard = this.$route.params.cardno // 廉租房补贴申请
        this.tempData.personPaperList3 = this.personPaperList3 // 廉租房租金核减
        if (this.sectionListb.shequ) {
          let disName = this.sectionListb.shequ
          let disLength = disName.length
          let bb = disName.substring(0, disLength - 12)
          this.formItem.itemInfoForm.yundizhi = this.sectionListb.qu + this.sectionListb.jiedao + bb
        }
      } else { // 下单
        this.formItem.itemInfoForm = {}
        this.formItem.itemInfoForm.itemid = this.$route.params.itemid
        this.formItem.itemInfoForm.applyPerson = this.personinfo.name || ''
        this.formItem.itemInfoForm.applyIdCard = this.$route.params.cardno
        this.formItem.itemInfoForm.phone = this.personinfo.phone || ''
        this.formItem.itemInfoForm.inputCommittee = this.communityData.shequ_code
        this.formItem.itemInfoForm.familyCode = this.ruleData.familyCode
        this.tempData = this.formItem.itemInfoForm
        this.tempData.personList1 = this.personList1 // 廉租房补贴申请
        this.tempData.houseList1 = this.houseList1 // 廉租房补贴申请
        this.tempData.personPaperList1 = this.personPaperList1 // 廉租房补贴申请
        this.tempData.personList2 = this.personList2 // 廉租房实物配租申请
        this.tempData.houseList2 = this.houseList2 // 廉租房实物配租申请
        this.tempData.personPaperList2 = this.personPaperList2 // 廉租房实物配租申请
        this.tempData.personList3 = this.personList3 // 廉租房租金核减
        this.tempData.houseList3 = this.houseList3 // 廉租房租金核减
        this.tempData.personPaperList3 = this.personPaperList3 // 廉租房租金核减
        this.tempData.personList = this.personList // 公租房申请
        this.tempData.houseList = this.houseList // 公租房申请
        this.tempData.personList[0].bz_name = this.personinfo.name
        this.tempData.personList[0].bz_idcard = this.$route.params.cardno
        this.tempData.personList1[0].bz_name = this.personinfo.name
        this.tempData.personList1[0].bz_idcard = this.$route.params.cardno
        this.tempData.personList2[0].bz_name = this.personinfo.name
        this.tempData.personList2[0].bz_idcard = this.$route.params.cardno
        this.tempData.personList3[0].bz_name = this.personinfo.name
        this.tempData.personList3[0].bz_idcard = this.$route.params.cardno
        if (this.sectionListb.shequ) {
          let disName = this.sectionListb.shequ
          let disLength = disName.length
          let bb = disName.substring(0, disLength - 12)
          this.formItem.itemInfoForm.yundizhi = this.sectionListb.qu + this.sectionListb.jiedao + bb
        }
      }
      this.$forceUpdate()
      this.formItem[item.form_path] = true
    },
    // 获取家庭成员低保情况列表数据
    getDbList () {
      console.log('zou 获取家庭成员低保情况列表数据fangfa ')
      this.bz_isDb_list = [{ label: '非低保', value: 2 }]
      var obj = {}
      if (this.formItem.itemInfoForm.isDb === 0) {
        obj = { label: '低保', value: 0 }
      } else if (this.formItem.itemInfoForm.isDb === 1) {
        obj = { label: '低保边缘', value: 1 }
      } else if (this.formItem.itemInfoForm.isDb === 2) {
        obj = { label: '非低保', value: 2 }
      } else {
        obj = { label: '特殊供养', value: 3 }
      }
      this.bz_isDb_list.push(obj)
      console.log(this.bz_isDb_list, '人员低保情况列表')
    },
    // 身份证号获取用户信息
    getuserinfo (cardno) {
      userinfo(cardno).then(res => {
        if (res.data.data) {
          this.personinfo = res.data.data
          this.personinfo.type = '身份证'
        } else {
          this.$Notice.error({ title: '查不到人员信息' })
        }
      })
    },
    saveOrder () {
      if (!this.formItem.operation) {
        this.$Notice.success({ title: '错误', desc: '非法操作' })
        return
      }
      let paramJson = {}
      let param = {
        item_id: this.$route.params.itemid,
        cardno: this.$route.params.cardno
      }
      let verify = true
      this.documentlist.forEach(element => {
        if (element.write_type === 'images' && element.img_urls) {
          paramJson[element.value] = element.img_urls.toString()
        } else if (element.write_type === 'form') {
          if (element.document_id === 152 || element.document_id === 155) {
            this.formItem.itemInfoForm.apply_date = date2str(this.formItem.itemInfoForm.apply_date)
            param.form_params = this.formItem.itemInfoForm
          } else if (element.document_id === 178) {
            this.formItem.itemInfoForm.processing_time = date2str(this.formItem.itemInfoForm.processing_time)
            this.formItem.itemInfoForm.family_members_name = date2str(this.formItem.itemInfoForm.family_members_name)
            this.formItem.itemInfoForm.family_members_ID = date2str(this.formItem.itemInfoForm.family_members_ID)
            this.formItem.itemInfoForm.death_realitive = date2str(this.formItem.itemInfoForm.death_realitive)
            param.form_params = this.formItem.itemInfoForm
          } else {
            // verify = this.saveJzInfo(false)
            param.form_params = this.formItem.itemInfoForm
          }
        }
      })
      if (!verify) return
      param.params = JSON.stringify(paramJson)
      param.code = this.$route.params.code
      console.log(param, '入参')
      // 入参中 params：要件json，form_params：表单对象
      updateOrder(param).then(res => {
        if (res.data.data) {
          this.$Notice.success({ title: '保存成功', desc: '业务编号：' + param.code })
          this.$router.push({ name: this.$route.params.path || 'workbench', params: this.$route.params.cur_data })
        } else {
          this.$Notice.error({ title: '保存失败', desc: res.data.errmsg })
        }
      })
    },
    // 查看图片原图功能
    originalGraph () {
      window.open(this.picPreviewMol.pic_urls[this.picPreviewMol.picIndex])
    },
    // 删除已经上传的图片
    deletePic () {
      this.picPreviewMol.pic_urls.splice(this.picPreviewMol.picIndex, 1)
      let temp = this.documentlist[this.formItem.paramIndex]
      temp.img_urls = this.picPreviewMol.pic_urls
      if (this.picPreviewMol.picIndex === 0) {
        if (temp.img_urls.length === 0) {
          temp.img_urls = null
          this.picPreviewMol.preShow = false
          this.formItem.reloadTabel = true
          temp.is_submit = '未提交'
          this.$nextTick(() => {
            this.formItem.reloadTabel = false
          })
        }
      } else {
        this.picPreviewMol.picIndex--
      }
    },
    backOrder () {
      this.$router.push({
        name: this.$route.params.path || 'workbench',
        params: this.$route.params.cur_data
      })
    },
    changeInMonth () {
      // 廉租房终止------终止原因
      if (this.ruleData.overReasonFlagList !== undefined) {
        this.formItem.itemInfoForm.overReasonFlagList = this.ruleData.overReasonFlagList
      }
      // 变更--月份字段
      if (this.ruleData.changeMonth !== undefined) {
        this.monthList = this.ruleData.changeMonth.split(',')
        /* console.log(monthList, '月份') */
        // 终止--月份字段
      } else if (this.ruleData.stopMonth !== undefined) {
        this.monthList = this.ruleData.stopMonth.split(',')
        // 年审--选择年份
      } else if (this.ruleData.years !== undefined) {
        this.monthList = this.ruleData.years.split(',')
        /*  console.log(monthList, '年份') */
      }
    },
    closeHeight () {
      console.log('guanbi')
      this.gpy_shows = false
      this.openNow = false
    },
    closeHeight1 () {
      this.mshow = false
      this.openNow = false
    },
    // 上一步（flag=false） || 下一步（flag=true）
    nextStep (flag) {
      if (flag === true) {
        this.loading = true
      } else {
        this.loading = false
      }
      if (!this.formItem.operation) {
        this.$Notice.success({ title: '错误', desc: '非法操作' })
        return
      }
      // 下一步按钮，当无订单编号时表示下单，否则是修改要件，operation=0时表示失败订单重新办理
      if (flag && (this.$route.params.operation === '0' || !this.$route.params.code)) {
        let param = {
          item_id: this.$route.params.itemid,
          cardno: this.$route.params.cardno
        }
        createOrder(param).then(res => {
          if (res.data.data) {
            this.$Notice.success({ title: '保存成功', desc: '请上传要件或表单，完善业务信息' })
            this.loading = false
            this.$route.params.code = res.data.data
            this.formItem.next_step = true
          } else {
            this.$Notice.error({ title: '保存失败', desc: res.data.errmsg })
            this.loading = false
          }
        })
      } else {
        this.formItem.next_step = flag
      }
    },
    getValidateRules () {
      console.log(this.$route.params.itemid, '事项id')
      ensureApply({ interface_code: 'fangchanju-qbxyjk', idCard: this.$route.params.cardno, code: this.aacode }).then(res => {
        if (res.data.errcode === 0) {
          this.ruleData = res.data.data
          this.formItem.itemInfoForm.familyCode = this.ruleData.familyCode
          this.changeInMonth()
          if (this.ruleData.lawCommitteesCode !== null && this.ruleData.lawCommitteesCode !== undefined) {
            this.bb(this.ruleData.lawCommitteesCode)
          }
        } else if (this.$route.params.itemid !== '11210101000000FCJD5212000257001' && this.$route.params.itemid !== '11210101000000FCJD5212000257002' && this.$route.params.itemid !== '11210101000000FCJD5212000257003' && this.$route.params.itemid !== '11210101000000FCJD5212000305000' && this.$route.params.itemid !== '11210101000000FCJD5212000308000' && this.$route.params.itemid !== '11210101000000FCJD5212000245000') { // 校验接口有问题则跳回首页不可申请
          var content = res.data.errmsg
          this.$Modal.error({
            title: this.errorTitle,
            content: content,
            onOk: () => {
              this.$router.push({
                name: 'mainv3'
              })
            }
          })
        }
      })
    },
    bb (code) {
      if (code !== undefined && code !== null && code !== '') {
        let param = { areacode: code }
        getSQCode(param).then(res => {
          if (res.data.errcode === 0) {
            this.sectionListb = res.data.data
          } else {
            this.$Notice.error({ title: '失败', desc: res.data.errmsg })
          }
        })
      }
    },
    // 上传图片前转base64
    beforeUpload (file) {
      this.upPicData.fileName = this.upPicData.fileName + '.' + file.type.substring(6)
      let that = this
      const reader = new FileReader()
      reader.readAsDataURL(file)
      reader.onload = () => {
        let index = reader.result.indexOf('base64,') + 7
        that.upPicData.file = reader.result.substring(index)
        that.upPic(that.upPicData)
      }
      return false
    },
    // 上传图片
    upPic (obj) {
      console.log('1111' + obj)
      var time = new Date().getTime()
      this.timeStep = time.toString()
      let param = {
        filePath: obj.filePath,
        fileName: obj.fileName,
        timestamp: this.timeStep
      }
      getSign(param).then(res => {
        if (res.data.errcode === 0) {
          createUpLoadFiles(res.data.data.docking_url, { sign: res.data.data.sign, timestamp: this.timeStep, filePath: obj.filePath, fileName: obj.fileName, file: obj.file }).then(res => {
            if (res.data.errcode === 0) {
              let imgurl = res.data.data
              let list = this.documentlist[this.formItem.paramIndex]
              if (list.img_urls) {
                list.img_urls.push(imgurl)
              } else {
                list.img_urls = [imgurl]
              }
              this.temp_photo = imgurl
            } else {
              this.$Notice.error({ title: '上传失败', desc: res.data.data.msg })
            }
          })
        } else {
          this.$Notice.error({ title: '上传失败', desc: res.data.data.msg })
        }
      })
    },
    translateDataToTree (data) {
      let parents = data.filter(value => value.parentId === 'undefined' || value.parentId === null)
      let children = data.filter(value => value.parentId !== 'undefined' && value.parentId !== null)
      let translator = (parents, children) => {
        parents.forEach((parent) => {
          children.forEach((current, index) => {
            if (current.parentId === parent.id) {
              let temp = JSON.parse(JSON.stringify(children))
              temp.splice(index, 1)
              translator([current], temp)
              typeof parent.children !== 'undefined' ? parent.children.push(current) : parent.children = [current]
            }
          }
          )
        }
        )
      }
      translator(parents, children)
      return parents
    },
    downloadPdf () { // pdf文件下载
      this.pdfModal = true
    }
  },
  mounted () {
    this.severUserInfo = this.$store.state.user.severUserInfo
    this.formItem.operation = this.$route.params.operation === '1'
    this.formItem.next_step = false
    console.log(this.formItem.next_step, '~~~~~')
    let disName = this.$route.params.itemid
    let disLength = disName.length
    this.aacode = disName.substring(disLength - 12, disLength)
    this.$route.params.operation = '1'
    let param = {
      'cardno': this.$route.params.cardno,
      'id': this.$route.params.itemid,
      'code': this.$route.params.code,
      'params': '1'
    }
    this.getuserinfo(param.cardno)
    iteminf(param).then(res => {
      if (res.data.data) {
        this.form_url = res.data.data.form_url
        this.itemData = res.data.data
        this.documentlist = res.data.data.documentlist
        this.documentlist.forEach(element => {
          element.necessary_name = element.necessary === '1' ? '必填' : '非必填'
          element.is_submit = '未提交'
          if (element.write_type === 'images') {
            element.type_name = '图片要件'
            if (element.img_url) {
              element.img_urls = element.img_url.split(',')
              element.is_submit = '已提交'
            }
          } else if (element.write_type === 'form') {
            element.type_name = '表单'
            if (element.write_type === 'form' && element.formdata) {
              this.formItem.itemInfoForm = element.formdata
              element.is_submit = '已提交'
            } else if (this.itemData.form_params) {
              element.is_submit = '已提交'
            }
          }
        })
      }
    })
  }
}
</script>
